home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIS Performer 2.2 Friends Demo
/
SGI IRIS Performer 2.2 Friends Demo.iso
/
friends
/
coryphaeus
/
dwb_writer
/
Makefile
next >
Wrap
Makefile
|
1997-10-31
|
3KB
|
165 lines
#
# Copyright (C) Coryphaeus Software, Inc. 1994
#
# Use a known shell
SHELL = /bin/sh
# Common objects used by the user
COMMONOBJS = pftodwb.o pfdwb.o
# Use the following if you have some '.o' files that haven't yet
# been converted to OpenGL
# Iris GL objects
IGLOBJS = ${COMMONOBJS}
# Open GL objects
OGLOBJS = ${COMMONOBJS}
# IrisGL and OpenGL libraries
LIBIGL = -lgl
LIBOGL = -lGLU -lGL -lXext
SYSTEM_IRISGL = \
-lmld \
-lmpc \
-limage \
-lfm \
${LIBIGL} \
-lXmu \
-lX11 \
-lm \
-lfpe \
-lmalloc \
-lC
SYSTEM_OPENGL = \
-lmld \
-lmpc \
-limage \
${LIBOGL} \
-lXmu \
-lX11 \
-lfpe \
-lm \
-lmalloc \
-lC
# Include Directores
INCLUDE = \
-I. \
-I/usr/include \
-I/usr/include/Performer \
-I/usr/include/sys \
-I/usr/include/X11 \
-I/usr/include/Xm
# Performer libraries, irisgl and opengl
IGLLIB = -lpf_igl -lpr_igl -lpfdu_igl -lpfutil_igl
OGLLIB = -lpf_ogl -lpr_ogl -lpfdu_ogl -lpfutil_ogl
# compiler to be used
CC = cc
# special flags for the compiler
# COPT and OPTIMIZEFLAG are passed in the first level of recursion
# This flag is basically used when the libraries are to be shipped,
# in which case this would be set to '-O2'
OPTIMIZEFLAG = -O2
CFLAGS = \
${OPTIMIZEFLAG} \
-D__EXTENSIONS__ -D_IRIX_ -D_BTRN_ \
${COPT} ${INCLUDE}
# special flags for the linker
LDFLAGS = \
-L/usr/lib \
-L/usr/lib/libpfdb
usage:
@echo ">> No targets defined. Building IrisGL version"
@echo ">> The following targets are valid"
@echo ">> - irisgl: IrisGL version"
@echo ">> - opengl: OpenGL version"
@${MAKE} irisgl
# default target
default: usage
all: irisgl opengl
# Default suffix rule. But move the object to the VPATH directory
# which could be IRISGL.OPT or OPENGL.OPT
.c.o:
@echo " compiling ${VERBOSE} $*.c"
@cc -c -fullwarn ${CFLAGS} ${INCLUDE} $*.c
@mv $*.o ${VPATH}
# Extensions
IRISGL = _igl
OPENGL = _ogl
# Target for IRISGL non-encrypted version of pftodwb
irisgl:
@echo "\nMaking IrisGL version of pftodwb\n"
@if test ! -d IRISGL.OPT ; then \
mkdir -p IRISGL.OPT ; \
fi
@${MAKE} -f Makefile \
VPATH="IRISGL.OPT/" \
COPT="-DIRISGL" \
LIBRARIES='${IGLLIB} ${SYSTEM_IRISGL}' \
OBJECTS='${IGLOBJS}' \
VERBOSE="[IrisGL version]" \
EXTENSION="${IRISGL}" \
pftodwb${IRISGL}
# Target for OPENGL non-encrypted version of pftodwb
opengl:
@echo "\nMaking OpenGL version of pftodwb\n"
@if test ! -d OPENGL.OPT; then \
mkdir -p OPENGL.OPT; \
fi
@${MAKE} -f Makefile \
VPATH="OPENGL.OPT/" \
COPT="-DOPENGL" \
LIBRARIES='${OGLLIB} ${SYSTEM_OPENGL}' \
OBJECTS='${OGLOBJS}' \
VERBOSE="[OpenGL version]" \
EXTENSION="${OPENGL}" \
pftodwb${OPENGL}
# Default targets. Creates one of the following executables:
# pftodwb_igl
# pftodwb_ogl
pftodwb${EXTENSION}: ${OBJECTS}
@echo "Linking ${VERBOSE} pftodwb"
@cd ${VPATH}; \
cc ${OBJECTS} \
${LDFLAGS} ${ESCENELIB} ${LIBRARIES} \
-o ../pftodwb${EXTENSION}
# Put your .o -> .c dependencies here
# DO NOT DELETE